from appium import webdriver
from selenium.webdriver.support.wait import WebDriverWait

driver_cap = {}
driver_cap['platformName'] = 'Android'
driver_cap['platformVersion'] = '7.1'
driver_cap['deviceName'] = '192.168.176.102:5555'
driver_cap['appPackage'] = 'com.android.settings'
driver_cap['appActivity'] = '.Settings'

driver = webdriver.Remote('http://localhost:4723/wd/hub', driver_cap)
WebDriverWait(driver, 10, 1).until(lambda x: x.find_element_by_class_name('android.widget.ImageButton')).click()
